package com.liuxia8.part7.delegation;

/**
 * Created by weng.junjie on 2017/2/18.
 */
public class SpaceShipDelegation {
    private String name;
    private  SpaceShipControls controls=new SpaceShipControls();
    public SpaceShipDelegation(String name){
        this.name=name;
    }
    public void back(int velocity){
        controls.back(velocity);
    }
    public void down(int velocity){
        controls.down(velocity);
    }
    public void forward(int velocity){
        controls.forward(velocity);
    }
    public void left(int velocity){
        controls.left(velocity);
    }
    public void right(int velocity){
        controls.right(velocity);
    }
    public void turboBoost(){
        controls.turboBoost();
    }
    public void up(int volocity){
        controls.up(volocity);
    }

    public static void main(String[] args) {
        SpaceShipDelegation d=new SpaceShipDelegation("nsea protector");
        d.forward(100);
    }
}
